from .. import db

import datetime


class AutoScore(db.Model):
    __tablename__ = 'auto_score'
    id = db.Column(db.Integer, primary_key=True)
    question_id = db.Column(db.Integer)
    answer = db.Column(db.Text)
    llm_output = db.Column(db.Text)
    llm_score = db.Column(db.Float)
    expert_score = db.Column(db.Float)
    model_name = db.Column(db.String)
    status = db.Column(db.SmallInteger, comment='0: except, 1: normal', default=1)
    create_time = db.Column(db.DateTime, default=datetime.datetime.now())
    update_time = db.Column(db.DateTime, default=datetime.datetime.now())

    def __repr__(self):
        return f"<AutoScore {self.id}:{self.ques_title}>"
